//==========================================================================
// Copyright (c) 2000-2009,  Elastos, Inc.  All Rights Reserved.
//==========================================================================

/*
 * breakpoint.h
 *
 * this file contains the definations of breakpoint instruction for each architecture.
 */

#ifndef __ELASTOS_BREAKPOINT_H__
#define __ELASTOS_BREAKPOINT_H__

#ifdef _x86
#define ELASTOS_GDBSERVER_BREAKPOINT 0xcc
#define ELASTOS_GDBSERVER_BPSTRING "cc"

#define ELASTOS_GDB_BREAKPOINT 0xcc
#define ELASTOS_GDB_BPSTRING "cc"

#define ELASTOS_HARD_BREAKPOINT 0xcc
#define ELASTOS_HARD_BPSTRING "cc"

#define BREAK_INSTRUCTION_LENGTH 1
#endif //_x86

#ifdef _arm
//breakpoint code which is used by GDBSERVER for inserting a breakpoint.
#define ELASTOS_GDBSERVER_BREAKPOINT	0xe7ffdefe
#define ELASTOS_GDBSERVER_BPSTRING "fedeffe7"

//breakpoint code which is used by GDB as a BREAK instruction.
#define ELASTOS_GDB_BREAKPOINT 0xe6000010
#define ELASTOS_GDB_BPSTRING "e6000010"

//breakpoint code which is used by DebugBreak() for implementing a BREAK instruction.
#define ELASTOS_HARD_BREAKPOINT 0xe7fddefe
#define ELASTOS_HARD_BPSTRING "fedefde7"

#define BREAK_INSTRUCTION_LENGTH 4
#endif //_arm

#ifdef _mips
//TODO: add mips breakpoint related.
#endif // _mips

#endif // __ELASTOS_BREAKPOINT_H__

